Skip to content

Conversation

tshepang
Copy link
Member

I don't understand what "not (only) rustdoc" means

@rustbot
Copy link
Collaborator

rustbot commented Aug 29, 2025

Thanks for the PR. If you have write access, feel free to merge this PR if it does not need reviews. You can request a review using r? rustc-dev-guide or r? <username>.

@rustbot rustbot added the S-waiting-on-review Status: this PR is waiting for a reviewer to verify its content label Aug 29, 2025
@@ -90,7 +90,8 @@ The following test suites are available, with links for more information:
| `rustdoc-ui` | Check terminal output of `rustdoc` ([see also](ui.md)) |

Some rustdoc-specific tests can also be found in `ui/rustdoc/`.
These check rustdoc-related or -specific lints that (also) run as part of `rustc`, not (only) `rustdoc`.
These check lints that are either related or specific to rustdoc,
that also run as part of `rustc`, not (only) `rustdoc`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was not a great sentence even before your change.

some background:

  1. bootstrap allows abbreviating Step paths named x/y/z as z. if there are multiple paths that end with z, it effectively picks a random path (it’s deterministic, but not predictable without reading the code).

this sentence is using rustdoc in a way that makes it look like it refers to x test tests/ui/rustdoc. i am not convinced that is even the suite path that runs when you say x test rustdoc, and i have no idea what x test rustc does, maybe unit tests for rustc-main (i.e. effectively a no-op).

i think the intent is actually to refer to the CLI tools themselves, not the paths passed to bootstrap, but that’s very unclear from context.

  1. tests/ui/rustdoc is running rustc, not rustdoc. tests/ui/rustdoc/README.md says this clearly IMO:

This directory is for tests that have to do with rustdoc, but test the behavior
of rustc. For example, rustc should not warn that an attribute rustdoc uses is
unknown.

i would suggest something like this:

Suggested change
that also run as part of `rustc`, not (only) `rustdoc`.
These check lints and behaviors *of rustc* that are related to rustdoc. Note that [not all lints emitted by rustc are emitted by rustdoc](https://rustc-dev-guide.rust-lang.org/rustdoc.html#constraints).

Copy link
Member

@fmease fmease Aug 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess I wrote these sentences and they're indeed quite poorly worded, oh my! I must've written them with a tired brain powering through the endless iterations of PR #2298 I simply wanted to have merged and be done with :'D

Copy link
Member

@fmease fmease Aug 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't meant to refer to specific compiletest test suites, with "lints that are run as part of $program" I was trying to express the fact that some lints are [emitted] / some lint [impls and/or passes] are run by both the binaries, rustc and rustdoc and we want to ensure that they (i.e., a specific subset of lints) are not only emitted / run when executing rustdoc but also when executing rustc.

@tshepang
Copy link
Member Author

tshepang commented Aug 30, 2025

@fmease are you happy with latest change

@@ -90,7 +90,8 @@ The following test suites are available, with links for more information:
| `rustdoc-ui` | Check terminal output of `rustdoc` ([see also](ui.md)) |

Some rustdoc-specific tests can also be found in `ui/rustdoc/`.
These check rustdoc-related or -specific lints that (also) run as part of `rustc`, not (only) `rustdoc`.
These tests ensure that lints that are emitted as part of executing rustdoc
Copy link
Member

@fmease fmease Aug 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how to rephrase this, but it's not (all) lints, it's only some lints. There are lints that are only emitted by rustdoc, not rustc, like the ones prefixed with rustdoc::.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe "certain" lints?

@fmease
Copy link
Member

fmease commented Aug 31, 2025

[@]fmease are you happy with latest change

That's already miles better, thank you! It's still not quite correct (see inline review comment).

@tshepang
Copy link
Member Author

am happy if you can push directly to the pr... I imagine you can

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: this PR is waiting for a reviewer to verify its content
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants